package com.skt.common_hr.yearadjustment.model.vo
{
	import com.wcl.utils.NumberUtil;
	
	
	[Bindable]
	public class CreditCard2VO
	{
		public var ENAME:String = "";	//성명
		public var REGNO:String = "";	//주민등록번호
		public var YEASUB:String = "";	//비용유형코드
		public var YEASTX:String = "";	//비용유형명
		public var TRDMK:String = "";	//구분-전통시장선택
		public var CCTRA:String = "";	//구분-대중교통선택
		public var CCOTH:String = "X";	//구분-기타선택
		public var AMT11:Number = 0;	//국세청금액
		public var AMT21:Number = 0;	//기타금액
		
		public var EXPRD:Number = 0;	//비용기간코드
		public var EXPRX:String = "";	//비용기간 TEXT
		
		public var CHECK:Boolean;

		public function clone():CreditCard2VO
		{
			var tmp:CreditCard2VO = new CreditCard2VO();
			
			tmp.ENAME = this.ENAME;
			tmp.REGNO = this.REGNO;
			tmp.YEASUB = this.YEASUB;
			tmp.YEASTX = this.YEASTX;
			tmp.TRDMK = this.TRDMK;
			tmp.CCTRA = this.CCTRA;
			tmp.CCOTH = this.CCOTH;
			tmp.AMT11 = this.AMT11;
			tmp.AMT21 = this.AMT21;
			
			tmp.EXPRD = this.EXPRD;
			tmp.EXPRX = this.EXPRX;

			return tmp;
		}
		
		public function get AMT11_F():String{
			return NumberUtil.NumberFormat(AMT11);
		}	
		
		public function get AMT21_F():String{
			return NumberUtil.NumberFormat(AMT21);
		}


		public function get RADIO():int{
			var value:int;
			
			if(TRDMK=="X"){
				value=1;
			}else if(CCTRA=="X"){
				value=2;
			}else if(CCOTH=="X"){
				value=3;
			}
			
			return value;
		}
		
		public function set RADIO(index:int):void{
			trace(index);
			if(index==1){
				TRDMK = "X";
				CCTRA = "";
				CCOTH = "";
			}else if(index==2){
				TRDMK = "";
				CCTRA = "X";
				CCOTH = "";
			}else if(index==3){
				TRDMK = "";
				CCTRA = "";
				CCOTH = "X";
			}else{
				TRDMK = "";
				CCTRA = "";
				CCOTH = "";
			}
		}
	}
}